import { defineStore } from 'pinia'

const useKeepAliveStore = defineStore('keepAlive', {
  state: () => ({
    keepAliveList: [] as string[],
  }),
  getters: {
    getKeepAliveList(state) {
      return state.keepAliveList || []
    },
  },
  actions: {
    setKeepAliveList(strs: string[]) {
      this.keepAliveList = strs
    },
  },
})

export default useKeepAliveStore
